CC=arm-apple-darwin-cc
LD=$(CC)
LDFLAGS=-ObjC -framework CoreFoundation -framework Foundation -framework UIKit -framework LayerKit \
          -framework CoreFoundation \
          -framework Foundation \
          -framework UIKit \
          -framework LayerKit \
          -framework CoreGraphics \
          -framework GraphicsServices \
          -framework CoreSurface \
          -framework CoreAudio \
          -larmfp

LDFLAGS_FRAMEWORKSDIR=-F/Developer/SDKs/iphone/heavenly/System/Library/

all:	MobileToDoList package install

MobileToDoList:	MobileToDoList.o MobileToDoListApplication.o ToDo.o ToDoView.o ToDoManager.o ToDoDetailView.o  ToDoGroupView.o ToDoPreferenceView.o ToDoGroupEditView.o ToDoGroupDetailView.o ToDoSetDateView.o ToDoOrderByView.o ToDoDeleteAfterView.o
	$(LD) $(LDFLAGS) -o $@ $^

%.o:	%.m
		$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@

package:
	rm -rf build
	mkdir build
	cp -r ./ToDoList.app ./build
	mv MobileToDoList ./build/ToDoList.app/
	

install:
	rm -rf build/ToDoList.app/*.svn
	rm -rf build/ToDoList.app/.svn
	scp -r build/ToDoList.app root@192.168.0.62:/Applications
	
clean:
		rm -f *.o MobileToDoList
